<template>
  <div class="galley" @click="$emit('handle-hide')">
    <div class="wroper">
      <swiper :options="swiperOption">
        <swiper-slide v-for="(item,index) of list" :key="index">
          <img :src="item">
        </swiper-slide>
        <div class="swiper-pagination" slot="pagination"></div>
      </swiper>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Galley',
  props: {
    list: Array
  },
  data () {
    return {
      swiperOption: {
        pagination: {
          el: '.swiper-pagination',
          type: 'fraction'
        },
        observer: true,
        observerParents: true
      }
    }
  }
}
</script>

<style lang="stylus" scoped="scoped">
  .wroper >>> .swiper-container
    overflow unset
  .galley
    background #000000
    position fixed
    top 0
    right 0
    left 0
    bottom 0
    z-index 99
    display flex
    flex-direction column
    justify-content center
    .wroper
      img
        width 100%
      .swiper-pagination
        margin-bottom -3rem
        color white
</style>
